﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cecbData;

namespace Dss.Methods
{
    public class xxInsert
    {
        public xxInsert() {

            cecbContext = new DSSEntities();
        }




        DSSEntities cecbContext;

        public void insertdata() {

            try
            {
                Impacts imp = new Impacts();
                imp.impt_name = "xxxx";
                imp.impt_reference = "impt4";
                imp.impt_status = true;
                imp.ComponentsReference.Value = cecbContext.Components.First(i => i.cmpt_name == "Aesthetics");
                cecbContext.AddToImpacts(imp);
                cecbContext.SaveChanges();

            }
            catch (Exception)
            {
                
                throw;
            }

        

        }


        public void update()
        {
            cecbContext.ExecuteStoreCommand("update Members set mem_name ='some status' where mem_reference = 'MEM1'");
        
        }
    }
}
